package day05;

class ComputerStudent extends Student {
    private int programmingScore;
    private int projectScore;
    private int finalExamScore;

    public ComputerStudent(String studentId, String name, char gender, int age) {
        super(studentId, name, gender, age);
    }

    @Override
    public double calculateTotalScore() {
        return (programmingScore * 0.4 + projectScore * 0.3 + finalExamScore * 0.3);
    }

    public void setProgrammingScore(int programmingScore) {
        this.programmingScore = programmingScore;
    }

    public void setProjectScore(int projectScore) {
        this.projectScore = projectScore;
    }

    public void setFinalExamScore(int finalExamScore) {
        this.finalExamScore = finalExamScore;
    }
}

class LiteratureStudent extends Student {
    private int essayScore;
    private int midExamScore;
    private int finalExamScore;

    public LiteratureStudent(String studentId, String name, char gender, int age) {
        super(studentId, name, gender, age);
    }

    @Override
    public double calculateTotalScore() {
        return (essayScore * 0.4 + midExamScore * 0.3 + finalExamScore * 0.3);
    }

    public void setEssayScore(int essayScore) {
        this.essayScore = essayScore;
    }

    public void setMidExamScore(int midExamScore) {
        this.midExamScore = midExamScore;
    }

    public void setFinalExamScore(int finalExamScore) {
        this.finalExamScore = finalExamScore;
    }
}



